package com.its.cloud.service.impl;

import com.its.cloud.dao.StorageMapper;
import com.its.cloud.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author huguangjun
 * @className StorageServiceImpl
 * @date 2021/1/18
 * @desc 10:57
 */
@Service
@Slf4j
public class StorageServiceImpl implements StorageService {

    @Resource
    private StorageMapper storageMapper;

    @Override
    public void decrease(Long productId, Integer count) {
        log.error("seata-storage-service中扣减库存-start");
        storageMapper.decrease(productId, count);
        log.error("seata-storage-service中扣减库存-end");
    }
}
